<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('查看题目')" />
</head>
<body class="gray-bg">
	
	<div class="wrapper wrapper-content animated fadeInRight">
		<div class="row">
			<div class="col-sm-12">
				<div class="ibox float-e-margins">
					<div class="ibox-title">
						<h5>查看题目</h5>
					</div>
					<div class="ibox-content">
						<form class="form-horizontal m" id="form-question-view" th:object="${question}">
							<input name="id" th:field="*{id}" type="hidden">
							<div class="form-group">
								<label class="col-sm-3 control-label">题目内容：</label>
								<div class="col-sm-8">
									<p class="form-control-static" th:text="*{questionTitle}"></p>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">题目类型：</label>
								<div class="col-sm-8">
									<p class="form-control-static" th:if="*{questionType} == 1">单选</p>
									<p class="form-control-static" th:if="*{questionType} == 2">多选</p>
									<p class="form-control-static" th:if="*{questionType} == 3">判断</p>
									<p class="form-control-static" th:if="*{questionType} == 4">填空</p>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">所属分类：</label>
								<div class="col-sm-8">
									<p class="form-control-static" >
										<span th:if="${not #lists.isEmpty(category)}" th:text="${category[0].categoryName}"></span>
										<span th:if="${#lists.isEmpty(category)}">未分类</span>
									</p>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">难度：</label>
								<div class="col-sm-8">
									<p class="form-control-static" th:if="*{difficulty} == 1">简单</p>
									<p class="form-control-static" th:if="*{difficulty} == 2">中等</p>
									<p class="form-control-static" th:if="*{difficulty} == 3">困难</p>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">选项A：</label>
								<div class="col-sm-8">
									<p class="form-control-static" th:text="*{optionA}"></p>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">选项B：</label>
								<div class="col-sm-8">
									<p class="form-control-static" th:text="*{optionB}"></p>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">选项C：</label>
								<div class="col-sm-8">
									<p class="form-control-static" th:text="*{optionC}"></p>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">选项D：</label>
								<div class="col-sm-8">
									<p class="form-control-static" th:text="*{optionD}"></p>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">正确答案：</label>
								<div class="col-sm-8">
									<p class="form-control-static" th:text="*{correctAnswer}"></p>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">答案解析：</label>
								<div class="col-sm-8">
									<p class="form-control-static" th:text="*{analysis}"></p>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">状态：</label>
								<div class="col-sm-8">
									<p class="form-control-static" th:if="*{status} == 1"><span class="label label-success">启用</span></p>
									<p class="form-control-static" th:if="*{status} == 0"><span class="label label-danger">禁用</span></p>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">创建者：</label>
								<div class="col-sm-8">
									<p class="form-control-static" th:text="*{createBy}"></p>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">创建时间：</label>
								<div class="col-sm-8">
									<p class="form-control-static" th:text="*{createTime}"></p>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">更新者：</label>
								<div class="col-sm-8">
									<p class="form-control-static" th:text="*{updateBy}"></p>
								</div>
							</div>
							<div class="form-group">
								<label class="col-sm-3 control-label">更新时间：</label>
								<div class="col-sm-8">
									<p class="form-control-static" th:text="*{updateTime}"></p>
								</div>
							</div>
							<div class="form-group">
								<div class="form-control-static col-sm-offset-9">
									<button type="button" class="btn btn-danger" onclick="closeItem()">关闭</button>
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>
	</div>
	
	<th:block th:include="include :: footer" />
	
	<script type="text/javascript">
		/* 关闭窗口 */
		function closeItem() {
			var index = parent.layer.getFrameIndex(window.name);
			parent.layer.close(index);
		}
	</script>
</body>
</html>